.class public abstract Lcom/instagram/android/y/b/d;
.super Ljava/lang/Object;
.source "VideoPlayer.java"

# interfaces
.implements Landroid/media/MediaPlayer$OnCompletionListener;
.implements Landroid/media/MediaPlayer$OnErrorListener;
.implements Landroid/media/MediaPlayer$OnInfoListener;
.implements Landroid/media/MediaPlayer$OnPreparedListener;


# instance fields
.field protected a:Landroid/media/MediaPlayer;

.field protected b:Lcom/instagram/android/y/b/g;

.field protected c:Lcom/instagram/android/y/b/f;

.field protected d:Lcom/instagram/android/y/b/e;

.field protected e:Lcom/instagram/android/y/b/h;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 72
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 73
    new-instance v0, Landroid/media/MediaPlayer;

    invoke-direct {v0}, Landroid/media/MediaPlayer;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    .line 74
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnPreparedListener(Landroid/media/MediaPlayer$OnPreparedListener;)V

    .line 75
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V

    .line 76
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnErrorListener(Landroid/media/MediaPlayer$OnErrorListener;)V

    .line 77
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnInfoListener(Landroid/media/MediaPlayer$OnInfoListener;)V

    .line 79
    sget-object v0, Lcom/instagram/android/y/b/h;->a:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 80
    return-void
.end method


# virtual methods
.method public abstract a()V
.end method

.method public a(FF)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 178
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p1, p2}, Landroid/media/MediaPlayer;->setVolume(FF)V

    .line 179
    return-void
.end method

.method public abstract a(Landroid/widget/FrameLayout;I)V
.end method

.method public a(Lcom/instagram/android/y/b/e;)V
    .locals 0
    .parameter

    .prologue
    .line 91
    iput-object p1, p0, Lcom/instagram/android/y/b/d;->d:Lcom/instagram/android/y/b/e;

    .line 92
    return-void
.end method

.method public a(Lcom/instagram/android/y/b/f;)V
    .locals 0
    .parameter

    .prologue
    .line 87
    iput-object p1, p0, Lcom/instagram/android/y/b/d;->c:Lcom/instagram/android/y/b/f;

    .line 88
    return-void
.end method

.method public a(Lcom/instagram/android/y/b/g;)V
    .locals 0
    .parameter

    .prologue
    .line 83
    iput-object p1, p0, Lcom/instagram/android/y/b/d;->b:Lcom/instagram/android/y/b/g;

    .line 84
    return-void
.end method

.method public a(Ljava/io/FileDescriptor;)V
    .locals 2
    .parameter

    .prologue
    .line 164
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->a:Lcom/instagram/android/y/b/h;

    if-eq v0, v1, :cond_0

    .line 165
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V

    .line 168
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p1}, Landroid/media/MediaPlayer;->setDataSource(Ljava/io/FileDescriptor;)V

    .line 169
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepareAsync()V

    .line 171
    sget-object v0, Lcom/instagram/android/y/b/h;->c:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 172
    return-void
.end method

.method protected abstract b()V
.end method

.method protected abstract c()V
.end method

.method public d()V
    .locals 3

    .prologue
    .line 185
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->d:Lcom/instagram/android/y/b/h;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->e:Lcom/instagram/android/y/b/h;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->f:Lcom/instagram/android/y/b/h;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->h:Lcom/instagram/android/y/b/h;

    if-ne v0, v1, :cond_1

    .line 189
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->start()V

    .line 190
    sget-object v0, Lcom/instagram/android/y/b/h;->e:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 194
    return-void

    .line 192
    :cond_1
    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "VideoPlayer cannot play in state "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public e()V
    .locals 2

    .prologue
    .line 112
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->a:Lcom/instagram/android/y/b/h;

    if-eq v0, v1, :cond_0

    .line 113
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V

    .line 114
    invoke-virtual {p0}, Lcom/instagram/android/y/b/d;->b()V

    .line 116
    sget-object v0, Lcom/instagram/android/y/b/h;->a:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 118
    :cond_0
    return-void
.end method

.method public f()V
    .locals 1

    .prologue
    .line 132
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V

    .line 133
    invoke-virtual {p0}, Lcom/instagram/android/y/b/d;->c()V

    .line 134
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    .line 135
    sget-object v0, Lcom/instagram/android/y/b/h;->j:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 136
    return-void
.end method

.method public g()V
    .locals 2

    .prologue
    .line 200
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->e:Lcom/instagram/android/y/b/h;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->f:Lcom/instagram/android/y/b/h;

    if-ne v0, v1, :cond_1

    .line 201
    :cond_0
    sget-object v0, Lcom/instagram/android/y/b/h;->f:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 202
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V

    .line 204
    :cond_1
    return-void
.end method

.method public h()Z
    .locals 1

    .prologue
    .line 211
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->a:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z

    move-result v0

    return v0
.end method

.method public i()Z
    .locals 2

    .prologue
    .line 219
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->f:Lcom/instagram/android/y/b/h;

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public j()Z
    .locals 2

    .prologue
    .line 228
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->h:Lcom/instagram/android/y/b/h;

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public k()Z
    .locals 4

    .prologue
    .line 232
    sget-object v0, Lcom/instagram/android/y/b/h;->d:Lcom/instagram/android/y/b/h;

    sget-object v1, Lcom/instagram/android/y/b/h;->e:Lcom/instagram/android/y/b/h;

    sget-object v2, Lcom/instagram/android/y/b/h;->f:Lcom/instagram/android/y/b/h;

    sget-object v3, Lcom/instagram/android/y/b/h;->h:Lcom/instagram/android/y/b/h;

    invoke-static {v0, v1, v2, v3}, Ljava/util/EnumSet;->of(Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;Ljava/lang/Enum;)Ljava/util/EnumSet;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    invoke-virtual {v0, v1}, Ljava/util/EnumSet;->contains(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public onCompletion(Landroid/media/MediaPlayer;)V
    .locals 1
    .parameter "mp"

    .prologue
    .line 268
    sget-object v0, Lcom/instagram/android/y/b/h;->h:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 270
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->d:Lcom/instagram/android/y/b/e;

    if-eqz v0, :cond_0

    .line 271
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->d:Lcom/instagram/android/y/b/e;

    invoke-interface {v0, p0}, Lcom/instagram/android/y/b/e;->a(Lcom/instagram/android/y/b/d;)V

    .line 273
    :cond_0
    return-void
.end method

.method public onError(Landroid/media/MediaPlayer;II)Z
    .locals 3
    .parameter "mp"
    .parameter "what"
    .parameter "extra"

    .prologue
    .line 281
    const-string v0, "VideoPlayer"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "MediaPlayer Error: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 283
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->c:Lcom/instagram/android/y/b/f;

    if-eqz v0, :cond_0

    .line 284
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->c:Lcom/instagram/android/y/b/f;

    invoke-interface {v0, p0}, Lcom/instagram/android/y/b/f;->a(Lcom/instagram/android/y/b/d;)Z

    move-result v0

    .line 287
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public onInfo(Landroid/media/MediaPlayer;II)Z
    .locals 3
    .parameter "mp"
    .parameter "what"
    .parameter "extra"

    .prologue
    .line 296
    const/16 v0, 0x2bc

    if-ne p2, v0, :cond_0

    .line 297
    const-string v0, "VideoPlayer"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "MediaPlayer Info: LAGGING "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 301
    :goto_0
    const/4 v0, 0x0

    return v0

    .line 299
    :cond_0
    const-string v0, "VideoPlayer"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "MediaPlayer Info: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public onPrepared(Landroid/media/MediaPlayer;)V
    .locals 1
    .parameter "mp"

    .prologue
    .line 255
    sget-object v0, Lcom/instagram/android/y/b/h;->d:Lcom/instagram/android/y/b/h;

    iput-object v0, p0, Lcom/instagram/android/y/b/d;->e:Lcom/instagram/android/y/b/h;

    .line 257
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->b:Lcom/instagram/android/y/b/g;

    if-eqz v0, :cond_0

    .line 258
    iget-object v0, p0, Lcom/instagram/android/y/b/d;->b:Lcom/instagram/android/y/b/g;

    invoke-interface {v0, p0}, Lcom/instagram/android/y/b/g;->a(Lcom/instagram/android/y/b/d;)V

    .line 260
    :cond_0
    return-void
.end method
